<template>
  <div class="shengmu2 base-background-img">
    <div class="d" @click="playFun(d)">
        <img src="~@/assets/youxiaoxianjie/shengmu/2/d.png">
    </div>
    <div class="t" @click="playFun(t)">
        <img src="~@/assets/youxiaoxianjie/shengmu/2/t.png">
    </div>
    <div class="n" @click="playFun(n)">
        <img src="~@/assets/youxiaoxianjie/shengmu/2/n.png">
    </div>
    <div class="l" @click="playFun(l)">
        <img src="~@/assets/youxiaoxianjie/shengmu/2/l.png">
    </div>
    <c-pdf @closePdf="closePdf" v-if="isshowpdf" :info="info" :infourl="pdfurl"></c-pdf>
  </div>
</template>

<script>
  export default {
    name: 'shengmu2',
    data () {
      return {
        isshowpdf: false,
        infourl: '',
        info: '',
        d: {
          url: 'static/youxiao/pdf/shengmu/d.pdf',
          data: []
        },
        t: {
          url: 'static/youxiao/pdf/shengmu/t.pdf',
          data: []
        },
        n: {
          url: 'static/youxiao/pdf/shengmu/n.pdf',
          data: []
        },
        l: {
          url: 'static/youxiao/pdf/shengmu/l.pdf',
          data: []
        }
      }
    },
    methods: {
      playFun: function (item) {
        console.log(item)
        this.isshowpdf = true
        this.pdfurl = item.url
        this.info = item.data
      },
      closePdf: function () {
        this.isshowpdf = false
      }
    }
  }
</script>

<style scoped>
.shengmu2 {
  background: url(~@/assets/youxiaoxianjie/shengmu/2/bg.png);
}
.shengmu2 > div {
  position: absolute; 
}
.d {
  top: 282px;
  left: 240px;
}
.t {
  top: 295px;
  left: 493px;
}
.n {
  top: 295px;
  left: 695px;
}
.l {
  top: 290px;
  left: 930px;
}
</style>
